/**
 * Created by Vivienfanghua on 2015/11/8.
 */
function readData(text,header)
{
    var data=new Array();
    var lines=text.split("\n");
    var start=0;
    if(header==true)
        start=1;
    for(i=start;i<lines.length;i++)
    {
        var ss=lines[i].split(",");
        if(ss.length<=1)
            continue;
        var one=new Array();
        for(sss in ss)
        {
            var trans=parseFloat(ss[sss]);
            if(isNaN(trans))
                one.push(ss[sss]);
            else
                one.push(trans);
        }
        data.push(one);
    }
    return data;
}